package com.dl698.axdr;

/**
 * RSD选择枚举
 * 定义RSD数据类型的选择值
 * 
 * @author wind
 * @version 1.1.1
 */
public enum RSDChoice {
    _ERR_NONE_SELECTED(-1),
    OMD0(0),
    S1(1),
    S2(2),
    S3(3),
    S4(4),
    S5(5),
    S6(6),
    S7(7),
    S8(8),
    S9(9),
    S10(10);

    private final int value;

    RSDChoice(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static RSDChoice fromValue(long value) {
        for (RSDChoice choice : RSDChoice.values()) {
            if (choice.value == value) {
                return choice;
            }
        }
        throw new IllegalArgumentException("No RSDChoice with value: " + value);
    }
}